let app = getApp();
Component({
  properties: {

  },
  data: {
    inputValue:0.5,
    model:0.5
  },
  methods: {
    Plus(){
        this.data.inputValue = this.data.inputValue + 0.5
        this.setData({
          inputValue:this.data.inputValue
        })
      this.triggerEvent("quantityChange", this.data.inputValue)
    },
    bindinput(e){
      this.data.inputValue = e.detail.value
      this.setData({
        inputValue:this.data.inputValue
      })
      this.triggerEvent("quantityChange", this.data.inputValue)
    },
    Minus(){
      if (this.data.inputValue == 0) return
      this.data.inputValue = this.data.inputValue - 0.5
      this.setData({
        inputValue:this.data.inputValue
      })
      this.triggerEvent("quantityChange", this.data.inputValue)
    },
  }
})
